package cn.icatw.wallpaperapi.controller;

import cn.icatw.wallpaperapi.common.R;
import cn.icatw.wallpaperapi.service.TypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author icatw
 * @date 2022/10/16
 * @email 762188827@qq.com
 * @apiNote
 */
@Api(tags = "前台分类接口")
@RestController
@RequestMapping("/api/type")
public class FrontTypeController {
    @Resource
    TypeService typeService;

    @ApiOperation(value = "获取所有分类")
    @GetMapping("/list")
    public R list() {
        return R.ok(typeService.list());
    }
}
